import React, { Component } from 'react'
import axios from 'axios';

export default class Proxy extends Component {
    render() {
        return (
            <div>
                <button onClick={this.send1}>发送请求1</button>
                <button onClick={this.send2}>发送请求2</button>
                <hr />
                <div style={{width: '300px',height: '300px',border:'solid 1px #aaa'}}></div>
            </div>
        )
    }

    send1 = async () => {
        let result = await axios('/api1/students');
        
        console.log(result);
    }

    send2 = async () => {
        let result = await axios('/api2/students');
        console.log(result);
    }
}
